package com.gcq.javawork.service;

import com.gcq.javawork.model.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author guochuqu
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2024-09-07 11:14:40
*/
public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param userAccount   "用户账号"
     * @param userPassword   "用户密码"
     * @param checkPassword   "确认密码"
     * @return
     */

    long userRegistered(String userAccount, String userPassword, String checkPassword);


    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 查询用户
     * @param userName
     * @return
     */
    List<User> searchUserByName(String userName);


    /**
     * 用户脱敏
     * @param handled
     * @return
     */
    public User userDesensitization(User handled);


}
